#include <iostream>
#include <vector>
#include <set>
#include "view.h"
#include "utils.h"
#include "law.h"
using namespace std ;

//world is infinite
//focus can be determined

vector< vector<bool> > focus = {
        {0,0,0},
        {0,1,0},
        {0,0,0}
};





int main() {
//    for (auto line : rend(focus)){
//        for (auto e : line){
//            cout << e << ' ';
//        }
//        cout << endl ;
//    }
    vector<vector<bool> > world {
            {0,1,0,0,1},
            {1,0,0,0,0},
            {1,0,0,0,1},
            {1,1,1,1,0},
            {0,0,0,0,0}
    };

    auto past = zeroPadding(world);
    for (int i = 0 ; i < 5 ; i ++){
        past = zeroPadding(past);
    }


    for (auto line : rend(past)){
        for (auto e : line){
            cout << e << ' ';
        }
        cout << endl ;
    }
    cout << endl << endl ;


    past = update(past);
    for (auto line : rend(past)){
        for (auto e : line){
            cout << e << ' ';
        }
        cout << endl ;
    }
    cout << endl << endl ;

//    past = zeroPadding(past);
    past = update(past);
    for (auto line : rend(past)){
        for (auto e : line){
            cout << e << ' ';
        }
        cout << endl ;
    }
    cout << endl << endl ;

//    past = zeroPadding(past);
    past = update(past);
    for (auto line : rend(past)){
        for (auto e : line){
            cout << e << ' ';
        }
        cout << endl ;
    }
    cout << endl << endl ;

//    past = zeroPadding(past);
    past = update(past);
    for (auto line : rend(past)){
        for (auto e : line){
            cout << e << ' ';
        }
        cout << endl ;
    }
    cout << endl << endl ;




    return 0;
}
